<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2 Final//EN">
<HTML>
<HEAD>
<TITLE>Ray Through Glasses</TITLE>

<meta http-equiv="Content-Type" content="text/html;charset=windows-1252">
</HEAD>
<BODY LANG="EN" BGCOLOR=#FFFFFF>

<H1><BR CLEAR=ALL><CENTER><TABLE BGCOLOR=#0060F0><TR><TD><B><FONT SIZE=5 COLOR=#C0FFFF>&nbsp;<A NAME="SECTION0001000000000000000000">
Ray Through Glasses</A>&nbsp;</FONT></B></TABLE></CENTER>
</H1>

<P>
Suppose we put two panes of glass back-to-back. How many ways <img src = "acm-10334_files/p10334a0.jpg"> are there for light rays to pass through or be reflected after changing direction <b>n</b> times ? Following figure shows the situations when the value of <b>n</b> is 0, 1 and 2. <br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<img src = "acm-10334_files/p1033400.jpg">

<P>

<H2><FONT COLOR=#0070E8><A NAME="SECTION0001001000000000000000">
Input</A>&nbsp;</FONT>
</H2>

<P>
It is a set of lines with an integer <B>n</B> where <B>0 <= n <= 1000 </B>
in each of them.

<P>

<H2><FONT COLOR=#0070E8><A NAME="SECTION0001002000000000000000">
Output</A>&nbsp;</FONT>
</H2>

<P>
For every one of these integers a line containing <img src = "acm-10334_files/p10334a0.jpg"> as described above.

<P>

<H2><FONT COLOR=#0070E8><A NAME="SECTION0001003000000000000000">
Sample Input</A>&nbsp;</FONT>
</H2>

<P>
<PRE>
0
1
2
</PRE>

<P>

<H2><FONT COLOR=#0070E8><A NAME="SECTION0001004000000000000000">
Sample Output</A>&nbsp;</FONT>
</H2>

<P>
<PRE>
1
2
3
</PRE>

<P>

<P>
<BR><HR>
<ADDRESS>
<I>Mohammad Sajjad Hossain</I>
<BR><I>2002-06-16</I>
</ADDRESS>
</BODY>
</HTML>
</HTML>

<!-- This document saved from http://acm.uva.es/problemset/v103/10334.html -->
